package com.mmy.controller.sys;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.alibaba.fastjson.JSONObject;
import com.mmy.domain.bidtender.VBidInvite;
import com.mmy.domain.car.TCarOrder;
import com.mmy.domain.constzone.TConstZone;
import com.mmy.domain.hotel.THotelOrder;
import com.mmy.domain.hotel.VHotelBase;
import com.mmy.domain.hotel.VHotelPlan;
import com.mmy.domain.line.TLineOrder;
import com.mmy.domain.permissionmenu.TConstRole;
import com.mmy.domain.permissionmenu.TSysUserRole;
import com.mmy.domain.plane.TPlaneOrder;
import com.mmy.domain.plane.VPlanePlan;
import com.mmy.domain.restaurant.TRestaurantOrder;
import com.mmy.domain.scenic.VScenicBase;
import com.mmy.domain.scenic.VScenicOrder;
import com.mmy.domain.scenic.VScenicPlan;
import com.mmy.domain.ship.TShipOrder;
import com.mmy.domain.sys.TSysOrg;
import com.mmy.domain.sys.TSysUser;
import com.mmy.domain.sys.VSysAddress;
import com.mmy.domain.sys.VSysUser;
import com.mmy.domain.train.TTrainOrder;
import com.mmy.domain.train.VTrainPlan;
import com.mmy.domain.visa.TVisaOrder;
import com.mmy.pojo.sys.SysUser;
import com.mmy.service.car.impl.CarOrderServiceImpl;
import com.mmy.service.impl.bidtender.BidInviteServiceImpl;
import com.mmy.service.impl.constzone.ConstZoneServiceImpl;
import com.mmy.service.impl.hotel.HotelBaseServiceImpl;
import com.mmy.service.impl.hotel.HotelOrderServiceImpl;
import com.mmy.service.impl.hotel.HotelPlanServiceImpl;
import com.mmy.service.impl.line.LineBaseServiceImpl;
import com.mmy.service.impl.line.LineOrderServiceImpl;
import com.mmy.service.impl.restaurant.RestaurantOrderServiceImpl;
import com.mmy.service.impl.sys.SysAddressServiceImpl;
import com.mmy.service.impl.sys.SysOrgServiceImpl;
import com.mmy.service.impl.sys.SysUserServiceImpl;
import com.mmy.service.impl.visa.VisaBaseServiceImpl;
import com.mmy.service.impl.visa.VisaOrderServiceImpl;
import com.mmy.service.permissionmenu.impl.PermissionServiceImpl;
import com.mmy.service.permissionmenu.impl.UserPermissionServiceImpl;
import com.mmy.service.plane.impl.PlaneOrderServiceImpl;
import com.mmy.service.plane.impl.PlanePlanServiceImpl;
import com.mmy.service.scenic.impl.ScenicBaseServiceImpl;
import com.mmy.service.scenic.impl.ScenicOrderServiceImpl;
import com.mmy.service.scenic.impl.ScenicPlanServiceImpl;
import com.mmy.service.ship.impl.ShipOrderServiceImpl;
import com.mmy.service.train.impl.TrainOrderServiceImpl;
import com.mmy.service.train.impl.TrainPlanServiceImpl;

import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import lombok.extern.slf4j.Slf4j;

/**
 * 类的介绍：用户管理
 *
 * @author hanxl 整理
 * @date 创建日期 2020.10.29
 * @version 1.0
 */

@Controller
@Slf4j
public class SysUserController {
	@Autowired
	SysUserServiceImpl sysUserServiceImpl;
	@Autowired
	SysOrgServiceImpl sysOrgServiceImpl;
	@Autowired
	PermissionServiceImpl permissionServiceImpl;
	@Autowired
	UserPermissionServiceImpl userPermissionServiceImpl;
	@Autowired
	SysAddressServiceImpl sysAddressServiceImpl;
	@Autowired
	ScenicBaseServiceImpl scenicBaseServiceImpl;
	@Autowired
	ScenicOrderServiceImpl scenicOrderServiceImpl;
	@Autowired
	LineBaseServiceImpl lineBaseServiceImpl;
	@Autowired
	LineOrderServiceImpl lineOrderServiceImpl;
	@Autowired
	HotelBaseServiceImpl hotelBaseServiceImpl;
	@Autowired
	HotelOrderServiceImpl hotelOrderServiceImpl;
	@Autowired
	RestaurantOrderServiceImpl restaurantOrderServiceImpl;
	@Autowired
	CarOrderServiceImpl carOrderServiceImpl;
	@Autowired
	TrainOrderServiceImpl trainOrderServiceImpl;
	@Autowired
	PlaneOrderServiceImpl planeOrderServiceImpl;
	@Autowired
	ShipOrderServiceImpl shipOrderServiceImpl;
	@Autowired
	VisaBaseServiceImpl visaBaseServiceImpl;
	@Autowired
	VisaOrderServiceImpl visaOrderServiceImpl;
	@Autowired
	BidInviteServiceImpl bidInviteServiceImpl;
	@Autowired
	ScenicPlanServiceImpl scenicPlanServiceImpl;
	@Autowired
	HotelPlanServiceImpl hotelPlanServiceImpl;
	@Autowired
	ConstZoneServiceImpl constZoneServiceImpl;
	@Autowired
	PlanePlanServiceImpl planePlanServiceImpl;
	@Autowired
	TrainPlanServiceImpl trainPlanServiceImpl;

	/**
	 * 首页加载
	 *
	 * @param 参数说明
	 * @return 返回值说明
	 * @throws 异常处理说明
	 * @author 创建人 hanxl 整理
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/")
	public String index(Model model, HttpSession session) {
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		if (sessionSysUser == null) {
			// 注册时获得所有公司名称
			List<TSysOrg> lstSysOrg = sysOrgServiceImpl.findAll();
			model.addAttribute("lstSysOrg", lstSysOrg);
		} else {
			// 首页显示类型为公务的已发布的招标信息
			List<VBidInvite> lstBidInvite0 = bidInviteServiceImpl.findByType0(sessionSysUser);
			model.addAttribute("lstBidInvite0", lstBidInvite0);
			// 首页显示类型为团建的已发布的招标信息
			List<VBidInvite> lstBidInvite1 = bidInviteServiceImpl.findByType1(sessionSysUser);
			model.addAttribute("lstBidInvite1", lstBidInvite1);
			// 首页显示类型为业内的已发布的招标信息
			List<VBidInvite> lstBidInvite2 = bidInviteServiceImpl.findByType2(sessionSysUser);
			model.addAttribute("lstBidInvite2", lstBidInvite2);
			// 首页显示类型为私密游的已发布的招标信息
			List<VBidInvite> lstBidInvite3 = bidInviteServiceImpl.findByType3(sessionSysUser);
			model.addAttribute("lstBidInvite3", lstBidInvite3);

		}
		// 获取当前定位信息
		String strCityName = (String) session.getAttribute("sessionCity");
		if (strCityName == null) {
			strCityName = "北京市";
		}
		TConstZone dbConstZone = constZoneServiceImpl.getZoneID(strCityName);
		// 首页显示旅游线首页
		// 近郊游 默认显示
		/*
		 * List<VLineBase> lstLineSurrouding =
		 * lineBaseServiceImpl.findSurroudingByType1(strCityName);
		 * model.addAttribute("lstLineSurrouding", lstLineSurrouding); // 境内游
		 * List<VLineBase> lstLineDomestic =
		 * lineBaseServiceImpl.findDomesticByType2(strCityName);
		 * model.addAttribute("lstLineDomestic", lstLineDomestic); // 境外游
		 * List<VLineBase> lstLineOutbound =
		 * lineBaseServiceImpl.findOutboundByType3(strCityName);
		 * model.addAttribute("lstLineOutbound", lstLineOutbound); // 目的地游
		 * List<VLineBase> lstLineDestination =
		 * lineBaseServiceImpl.findDestinationByType4(strCityName);
		 * model.addAttribute("lstLineDestination", lstLineDestination); // 签证
		 * List<VVisaBase> lstVisaBase = visaBaseServiceImpl.findVisa();
		 * model.addAttribute("lstVisaBase", lstVisaBase); // 首页显示景区模块 List<VScenicBase>
		 * lstScenicBase = scenicBaseServiceImpl.findScenic(strCityName);
		 * model.addAttribute("lstScenicBase", lstScenicBase);
		 */
		// 首页显示酒店模块
		// 要求图片只显示当前定位的最新上架的前八个
		// 第一步 查询计划日期大于当前日期的酒店ID 价格区间在搜索范围的 引用的是前台酒店菜单的查询
		String strHotelPrice1 = null;
		String strHotelPrice2 = null;
		List<Integer> lstHotelID = hotelPlanServiceImpl.getHotelID(strHotelPrice1, strHotelPrice2);
		// 第二步查询 当前定位且有计划的景区
		List<VHotelBase> lstHotelBase = hotelBaseServiceImpl.findHotel(lstHotelID, dbConstZone.getZoneID());
		model.addAttribute("lstHotelBase", lstHotelBase);
		// 当前时间有效的计划最小价格
		List<VHotelPlan> lstHotelPlan = hotelPlanServiceImpl.getMinPrice();
		model.addAttribute("lstHotelPlan", lstHotelPlan);

		// 首页显示景区
		// 要求图片只显示当前定位的最新上架的前八个

		// 第一步 查询计划日期大于当前日期的景区ID 价格区间在搜索范围的 引用的是前台景区菜单的查询
		String strScenicPrice1 = null;
		String strScenicPrice2 = null;
		List<Integer> lstScenicID = scenicPlanServiceImpl.getScenicID(strScenicPrice1, strScenicPrice2);
		// 第二步查询 当前定位且有计划的景区
		List<VScenicBase> lstScenicBase = scenicBaseServiceImpl.findScenic(lstScenicID, dbConstZone.getZoneID());
		model.addAttribute("lstScenicBase", lstScenicBase);
		// 当前时间有效的计划最小价格
		List<VScenicPlan> lstScenicPlan = scenicPlanServiceImpl.getMinPrice();
		model.addAttribute("lstScenicPlan", lstScenicPlan);
		// 机票
		// 国内机票推荐模块 推荐由北京出发的机票信息 前10条

		List<VPlanePlan> lstPlanePlan = planePlanServiceImpl.findByZoneOutName(strCityName);
		model.addAttribute("lstPlanePlan", lstPlanePlan);
		// 火车票
		// 国内机票推荐模块 推荐由北京出发的机票信息 前10条

		List<VTrainPlan> lstTrainPlan = trainPlanServiceImpl.findByZoneOutName(strCityName);
		model.addAttribute("lstTrainPlan", lstTrainPlan);
		return "Index";
	}

	/**
	 * 函数功能说明： 用户登录
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/login")
	@ResponseBody
	public String login(HttpSession session,@RequestBody Map<String,String> params) {
		
		String num = params.get("num");
		String pass = params.get("pass");
		
		Map<String,Object> res = new HashMap<String,Object>();
		
		TSysUser dbSysUser = sysUserServiceImpl.findUser(num);
		if (dbSysUser == null) {
			log.info("未注册");
			res.put("code", 400);
			return JSONObject.toJSONString(res);
		} else {
			if(dbSysUser.getSpare1() == "0") {
				log.info("未审核");
				res.put("code", 300);
				return JSONObject.toJSONString(res);
			}
			else if (dbSysUser.getPassWord().equals(pass)) {
				log.info("登陆成功");
				res.put("code", 100);
				session.setAttribute("tSysUser", dbSysUser);
				return JSONObject.toJSONString(res);
			} else {
				log.info("密码错误");
				res.put("code", 200);
				return JSONObject.toJSONString(res);
			}
		}

	}
	
	/**
	 * 函数功能说明：用户注册
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/reg")
	public String register(TSysUser tSysUser, String strUpUserID, String strUserType, HttpSession session, Model model) {
		
		if (sysUserServiceImpl.findUser(tSysUser)) {
			sysUserServiceImpl.saveUser(tSysUser, strUpUserID, strUserType);
			TSysUser dbSysUser = sysUserServiceImpl.findUser(tSysUser.getUserMobile());
			if (dbSysUser != null) {
				session.setAttribute("tSysUser", dbSysUser);
				//注册成功
				model.addAttribute("msg", "注册成功");
				model.addAttribute("code",100);
				return "Index";
			} else {
				//注册失败
				model.addAttribute("msg", "注册失败,请重新填写");
				model.addAttribute("code",200);
				return "Index";
			}
		} else {
			//账号存在
			model.addAttribute("msg","注册失败,手机号已存在");
			model.addAttribute("code",300);
			return "Index";
		}
	}
	
	/**
	 * 函数功能说明： 用户退出
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/logout")
	public String logout(HttpSession session) {
		if (session != null) {
			// 关闭session
			session.invalidate();
		}
		return "redirect:/";
	}

	/**
	 * 函数功能说明： 检查推荐人是否存在
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/isexistupuserid")
	@ResponseBody
	public boolean isExistUpUserID(HttpServletRequest request) {
		if (sysUserServiceImpl.findByID(request.getParameter("iUpUserID")) == null) {
			return false;
		} else {
			return true;
		}
	}

	/**
	 * 函数功能说明： 根据推荐人更改所属公司
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/changeorgid")
	@ResponseBody
	public int ChangeOrgID(HttpServletRequest request) {

		int iOrgID = sysUserServiceImpl.findByID(request.getParameter("iUserID")).getOrgID();
		return iOrgID;

	}

	/**
	 * 函数功能说明： 进入审核员工页面，有权限员工审核自己注册的员工，只能审核自己所属公司的员工
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/reviewinfo")
	public String toReviewInfo(HttpSession session, Model model) {
		// 获取session的所属公司
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取给公司的所有未审核人员
		List<VSysUser> lstSysUser = sysUserServiceImpl.findByMemoOrgID(sessionSysUser.getOrgID());
		model.addAttribute("lstSysUser", lstSysUser);
		return "OA/leaveandreview/ReviewInfo";
	}

	/**
	 * 函数功能说明： 选择想要通过审核的员工，进入选择用户角色页面
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/toupdatereview")
	public String toUpdateReview(HttpServletRequest request, Model model) {
		VSysUser dbSysUser = sysUserServiceImpl.findByUserID(request.getParameter("iUserID"));
		model.addAttribute("dbSysUSer", dbSysUser);
		// 获取所有角色名称
		List<TConstRole> lstConstRole = permissionServiceImpl.findAll();
		model.addAttribute("lstConstRole", lstConstRole);
		return "OA/leaveandreview/UpdateReview";
	}

	/**
	 * 函数功能说明： 通过审核的员工选择角色后提交
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/updatereview")
	public String updateReview(HttpServletRequest request, HttpSession session, Model model, String checkList) {
		// 修改用户类型
		TSysUser dbSysUser = sysUserServiceImpl.findByID(request.getParameter("iUserID"));
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.save(dbSysUser, sessionSysUser);
		// 给员工分配角色
		userPermissionServiceImpl.createRolePermission(checkList, request.getParameter("iUserID"), sessionSysUser);
		return "redirect:reviewinfo";
	}

	/**
	 * 函数功能说明：员工自己注册未通过审核
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人hanxl 整理
	 * @date 创建日期 2020.10.29
	 * 
	 */
	@RequestMapping(value = "/toupdatenotreview")
	public String toUpdateNotReview(HttpServletRequest request, HttpSession session) {
		// 第一步 通过ID查找该用户 并删除该用户信息
		TSysUser dbSysUser = sysUserServiceImpl.findByID(request.getParameter("iUserID"));
		sysUserServiceImpl.delByUserID(request.getParameter("iUserID"));
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.createUser(dbSysUser, sessionSysUser);
		return "redirect:reviewinfo";
	}

	/**
	 * 函数功能说明： 用户进入个人信息并加载收货地址信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/perinfo")
	public String toPerinfo(HttpSession session, Model m) {
		/* 获得所有公司名称 */
		List<TSysOrg> lstSysOrg = sysOrgServiceImpl.findAll();
		m.addAttribute("lstSysOrg", lstSysOrg);
		/* 获得该用户的所有收货地址 */
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		List<VSysAddress> lstSysAddress = sysAddressServiceImpl.findByUserID(sessionSysUser.getUserID());
		m.addAttribute("lstSysAddress", lstSysAddress);
		return "permanagement/PerInfo";
	}

	/**
	 * 函数功能说明： 用户个人信息修改
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/toupdateperinfo")
	public String toUpdatePerinfo(Model model) {
		// 获取所有公司信息
		List<TSysOrg> lstSysOrg = sysOrgServiceImpl.findAll();
		model.addAttribute("lstSysOrg", lstSysOrg);
		return "/permanagement/UpdatePerInfo";
	}

	/**
	 * 函数功能说明：提交修改的个人信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/saveupdateperinfo")
	public String updatePerInfo(MultipartFile fPhotoPath, MultipartFile fCadePath, TSysUser tSysUser,
			HttpSession session) throws Exception {
		TSysUser dbSysUser = sysUserServiceImpl.updateUser(fPhotoPath, fCadePath, tSysUser);
		session.setAttribute("tSysUser", dbSysUser);

		return "redirect:perinfo";
	}

	/**
	 * 函数功能说明： 用户密码修改
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/toupdatepassword")
	public String toUpdatePassword() {
		return "/permanagement/UpdatePassword";
	}

	/**
	 * 函数功能说明： 用户密码修改提交
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/saveupdatepassword")
	public String saveUpdatePassword(String strPassword, HttpSession session) throws Exception {
		// 从当前session中获取用户信息
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		TSysUser dbSysUser = sysUserServiceImpl.updatePassword(sessionSysUser, strPassword);
		session.setAttribute("tSysUser", dbSysUser);
		return "redirect:/";
	}

	/**
	 * 函数功能说明： 显示我的景点预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myscenicreserve")
	public String myScenicReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取景点预留
		List<VScenicOrder> lstScenicOrder = scenicOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		HashMap<String, Integer> mapPage = scenicOrderServiceImpl.mapScenicReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstScenicOrder", lstScenicOrder);
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyScenicReserve";
	}

	/**
	 * 函数功能说明： 显示我的线路预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mylinereserve")
	public String myLineReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取线路预留
		List<TLineOrder> lstLineOrder = lineOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstLineOrder", lstLineOrder);
		HashMap<String, Integer> mapPage = lineOrderServiceImpl.mapLineReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyLineReserve";
	}

	/**
	 * 函数功能说明： 显示我的酒店预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myhotelreserve")
	public String myHotelReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取酒店房间预留
		List<THotelOrder> lstHotelOrder = hotelOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstHotelOrder", lstHotelOrder);
		HashMap<String, Integer> mapPage = hotelOrderServiceImpl.mapHotelReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyHotelReserve";
	}

	/**
	 * 函数功能说明： 显示我的餐馆预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myrestaurantreserve")
	public String myRestaurantReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取餐馆预留
		List<TRestaurantOrder> lstRestaurantOrder = restaurantOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstRestaurantOrder", lstRestaurantOrder);
		HashMap<String, Integer> mapPage = restaurantOrderServiceImpl.mapRestaurantReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyRestaurantReserve";
	}

	/**
	 * 函数功能说明： 显示我的车辆预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mycarreserve")
	public String myCarReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取租车预留
		List<TCarOrder> lstCarOrder = carOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstCarOrder", lstCarOrder);
		HashMap<String, Integer> mapPage = carOrderServiceImpl.mapCarReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyCarReserve";
	}

	/**
	 * 函数功能说明： 显示我的专列预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mytrainreserve")
	public String myTrainReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取专列预留
		List<TTrainOrder> lstTrainOrder = trainOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstTrainOrder", lstTrainOrder);
		HashMap<String, Integer> mapPage = trainOrderServiceImpl.mapTrainReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyTrainReserve";
	}

	/**
	 * 函数功能说明： 显示我的机票预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myplanereserve")
	public String myPlaneReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取机票预留
		List<TPlaneOrder> lstPlaneOrder = planeOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstPlaneOrder", lstPlaneOrder);
		HashMap<String, Integer> mapPage = planeOrderServiceImpl.mapPlaneReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyPlaneReserve";
	}

	/**
	 * 函数功能说明： 显示我的船票预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myshipreserve")
	public String myShipReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取船票预留
		List<TShipOrder> lstShipOrder = shipOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstShipOrder", lstShipOrder);
		HashMap<String, Integer> mapPage = shipOrderServiceImpl.mapShipReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyShipReserve";
	}

	/**
	 * 函数功能说明： 显示我的签证预留信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myvisareserve")
	public String myVisaReserve(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取签证预留
		List<TVisaOrder> lstVisaOrder = visaOrderServiceImpl.findByUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstVisaOrder", lstVisaOrder);
		HashMap<String, Integer> mapPage = visaOrderServiceImpl.mapVisaReserve(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyVisaReserve";
	}

	/**
	 * 函数功能说明： 显示我的景点订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myscenicorder")
	public String myScenicOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取景点订单
		List<VScenicOrder> lstScenicOrder = scenicOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstScenicOrder", lstScenicOrder);
		HashMap<String, Integer> mapPage = scenicOrderServiceImpl.mapScenicOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyScenicOrder";
	}

	/**
	 * 函数功能说明： 显示我的线路订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mylineorder")
	public String myLineOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取线路订单
		List<TLineOrder> lstLineOrder = lineOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstLineOrder", lstLineOrder);
		HashMap<String, Integer> mapPage = lineOrderServiceImpl.mapLineOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyLineOrder";
	}

	/**
	 * 函数功能说明： 显示我的酒店订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myhotelorder")
	public String myHotelOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取酒店房间订单
		List<THotelOrder> lstHotelOrder = hotelOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstHotelOrder", lstHotelOrder);
		HashMap<String, Integer> mapPage = hotelOrderServiceImpl.mapHotelOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyHotelOrder";
	}

	/**
	 * 函数功能说明： 显示我的餐馆订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myrestaurantorder")
	public String myRestaurantOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取餐馆订单
		List<TRestaurantOrder> lstRestaurantOrder = restaurantOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstRestaurantOrder", lstRestaurantOrder);
		HashMap<String, Integer> mapPage = restaurantOrderServiceImpl.mapRestaurantOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyRestaurantOrder";
	}

	/**
	 * 函数功能说明： 显示我的车辆订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mycarorder")
	public String myCarOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取租车订单
		List<TCarOrder> lstCarOrder = carOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstCarOrder", lstCarOrder);
		HashMap<String, Integer> mapPage = carOrderServiceImpl.mapCarOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyCarOrder";
	}

	/**
	 * 函数功能说明： 显示我的专列订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mytrainorder")
	public String myTrainOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取专列订单
		List<TTrainOrder> lstTrainOrder = trainOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstTrainOrder", lstTrainOrder);
		HashMap<String, Integer> mapPage = trainOrderServiceImpl.mapTrainOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyTrainOrder";
	}

	/**
	 * 函数功能说明： 显示我的机票订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myplaneorder")
	public String myPlaneOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取机票订单
		List<TPlaneOrder> lstPlaneOrder = planeOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstPlaneOrder", lstPlaneOrder);
		HashMap<String, Integer> mapPage = planeOrderServiceImpl.mapPlaneOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyPlaneOrder";
	}

	/**
	 * 函数功能说明： 显示我的船票订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myshiporder")
	public String myShipOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取船票订单
		List<TShipOrder> lstShipOrder = shipOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstShipOrder", lstShipOrder);
		HashMap<String, Integer> mapPage = shipOrderServiceImpl.mapShipOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyShipOrder";
	}

	/**
	 * 函数功能说明： 显示我的签证订单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myvisaorder")
	public String myVisaOrder(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取签证订单
		List<TVisaOrder> lstVisaOrder = visaOrderServiceImpl.findByOrderUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstVisaOrder", lstVisaOrder);
		HashMap<String, Integer> mapPage = visaOrderServiceImpl.mapVisaOrder(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyVisaOrder";
	}

	/**
	 * 函数功能说明： 显示我的景点退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myscenicrefund")
	public String myScenicRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取景点退单
		List<VScenicOrder> lstScenicOrder = scenicOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstScenicOrder", lstScenicOrder);
		HashMap<String, Integer> mapPage = scenicOrderServiceImpl.mapScenicRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyScenicRefund";
	}

	/**
	 * 函数功能说明： 显示我的线路退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mylinerefund")
	public String myLineRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取线路退单
		List<TLineOrder> lstLineOrder = lineOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstLineOrder", lstLineOrder);
		HashMap<String, Integer> mapPage = lineOrderServiceImpl.mapLineRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyLineRefund";
	}

	/**
	 * 函数功能说明： 显示我的酒店退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myhotelrefund")
	public String myHotelRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取酒店房间退单
		List<THotelOrder> lstHotelOrder = hotelOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstHotelOrder", lstHotelOrder);
		HashMap<String, Integer> mapPage = hotelOrderServiceImpl.mapHotelRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyHotelRefund";
	}

	/**
	 * 函数功能说明： 显示我的餐馆退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myrestaurantrefund")
	public String myRestaurantRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取餐馆退单
		List<TRestaurantOrder> lstRestaurantOrder = restaurantOrderServiceImpl.findByChargeBackUserID(pageNumber,
				pageSize, sessionSysUser.getUserID());
		model.addAttribute("lstRestaurantOrder", lstRestaurantOrder);
		HashMap<String, Integer> mapPage = restaurantOrderServiceImpl.mapRestaurantRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyRestaurantRefund";
	}

	/**
	 * 函数功能说明： 显示我的车辆退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mycarrefund")
	public String myCarRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取租车退单
		List<TCarOrder> lstCarOrder = carOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstCarOrder", lstCarOrder);
		HashMap<String, Integer> mapPage = carOrderServiceImpl.mapCarRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyCarRefund";
	}

	/**
	 * 函数功能说明： 显示我的专列退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/mytrainrefund")
	public String myTrainRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取专列退单
		List<TTrainOrder> lstTrainOrder = trainOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstTrainOrder", lstTrainOrder);
		HashMap<String, Integer> mapPage = trainOrderServiceImpl.mapTrainRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyTrainRefund";
	}

	/**
	 * 函数功能说明： 显示我的机票退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myplanerefund")
	public String myPlaneRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取机票退单
		List<TPlaneOrder> lstPlaneOrder = planeOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstPlaneOrder", lstPlaneOrder);
		HashMap<String, Integer> mapPage = planeOrderServiceImpl.mapPlaneRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyPlaneRefund";
	}

	/**
	 * 函数功能说明： 显示我的船票退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myshiprefund")
	public String myShipRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取船票退单
		List<TShipOrder> lstShipOrder = shipOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstShipOrder", lstShipOrder);
		HashMap<String, Integer> mapPage = shipOrderServiceImpl.mapShipRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyShipRefund";
	}

	/**
	 * 函数功能说明： 显示我的签证退单信息
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.10.29
	 */
	@RequestMapping(value = "/myvisarefund")
	public String myVisaRefund(String pageNumber, String pageSize, HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 获取签证退单
		List<TVisaOrder> lstVisaOrder = visaOrderServiceImpl.findByChargeBackUserID(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("lstVisaOrder", lstVisaOrder);
		HashMap<String, Integer> mapPage = visaOrderServiceImpl.mapVisaRefund(pageNumber, pageSize,
				sessionSysUser.getUserID());
		model.addAttribute("iPageNo", mapPage.get("iPageNo"));
		model.addAttribute("iTotalCount", mapPage.get("iTotalCount"));
		model.addAttribute("iMaxPage", mapPage.get("iMaxPage"));
		model.addAttribute("iPageSize", mapPage.get("iPageSize"));
		return "permanagement/MyVisaRefund";
	}

	/**
	 * 函数功能说明：进入后台
	 *
	 * @param 参数说明 tSysUser:用户类 用户 session
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2020.08.13
	 */
	@RequestMapping(value = "/backindex")
	public String toWebbackgroundIndex(HttpSession session, Model model) {
		// 获取登录用户
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");

		return "BackIndex";
	}

	/**
	 * 跳转员工页
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backstaffindex")
	public String findAllStaff(Model model) {
		return "webbackground/staffmanagement/StaffIndex";
	}

	/**
	 * 函数功能说明： 异步--用户信息列表数据
	 * 
	 * 
	 * @return 返回值说明 jsp页面
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 *
	 */
	@RequestMapping("/backstaffjson")
	@ResponseBody
	public String backStaffJson(HttpServletRequest request, HttpSession session, Model model) {

		// 接收的分页信息处理
		int page = Integer.parseInt(request.getParameter("page"));
		int rows = Integer.parseInt(request.getParameter("rows"));
		int startIndex = (page - 1) * rows;
		int count = rows;
		// 搜索条件
		String strUserName = request.getParameter("userName");
		String strUserSex = request.getParameter("userSex");
		String strUserMobile = request.getParameter("userMobile");
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 超级管理员显示所有的公司的员工 其他旅行社可以看到自己的公司的员工信息
		// 表格数据
		List<VSysUser> lstSysStaff = sysUserServiceImpl.findStaffByOrgID(sessionSysUser, strUserName, strUserSex,
				strUserMobile, startIndex, count);

		model.addAttribute("lstSysStaff", lstSysStaff);
		// 数据总数量
		int total = sysUserServiceImpl.queryStaffCount(sessionSysUser, strUserName, strUserSex, strUserMobile);
		Map<String, Object> ret = new HashMap<String, Object>();
		ret.put("rows", lstSysStaff);
		ret.put("total", total);
		return JSONObject.toJSONString(ret);
	}

	/**
	 * 进入创建员工页面
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backtocreatestaff")
	public String backCreateStaff(Model model, HttpSession session) {
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 超级管理员登录查找所有公司
		if (sessionSysUser.getUserID() == 0) {

			List<TSysOrg> lstSysOrg = sysOrgServiceImpl.findAll();
			model.addAttribute("lstSysOrg", lstSysOrg);
		} else {
//查找登录人所在公司信息
			TSysOrg dbSysOrg = sysOrgServiceImpl.findByOrgID(sessionSysUser.getOrgID());
			model.addAttribute("dbSysOrg", dbSysOrg);
		}
//查找登录人所在公司的员工
		List<TSysUser> lstSysUser = sysUserServiceImpl.findByOrgIDandType(sessionSysUser.getOrgID());
		model.addAttribute("lstSysUser", lstSysUser);
		/* 查询所有角色 */
		List<TConstRole> lstConstRole = permissionServiceImpl.findAll();
		model.addAttribute("lstConstRole", lstConstRole);
		return "webbackground/staffmanagement/CreateStaff";
	}

	/**
	 * 创建员工 填写推荐人用
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/finduserbyorgidandtype")
	@ResponseBody
	public Map<String, Object> findUserByOrgIDAndType(HttpServletRequest request, Model model) {

//查找该公司的员工
		List<TSysUser> lstSysUser = sysUserServiceImpl
				.findByOrgIDandType(Integer.parseInt(request.getParameter("iOrgID")));

		Map<String, Object> data = new HashMap<>();
		data.put("lstSysUser", lstSysUser);
		return data;
	}

	/**
	 * 创建员工 会员 判断是否存在该用户 身份证
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistuser")
	@ResponseBody
	public Boolean isExistUser(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUserByIdentity(request.getParameter("strIdentity"));
		if (dbSysUser == null) {
			return true;
		} else {
			return false;
		}
	}

	/**
	 * 创建员工 会员 判断是否存在该用户 手机号
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistusermobile")
	@ResponseBody
	public Boolean isExistUserMobile(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUser(request.getParameter("strUserMobile"));
		if (dbSysUser == null) {
			return true;
		} else {
			return false;
		}
	}

	/**
	 * 创建员工 会员 判断是否存在该用户 邮箱
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistusermail")
	@ResponseBody
	public Boolean isExistUserMail(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUser(request.getParameter("strMail"));
		if (dbSysUser == null) {
			return true;
		} else {
			return false;
		}
	}

	/**
	 * 创建员工 提交
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/backsavecreatestaff")
	public String saveCreateStaff(TSysUser tSysUser, MultipartFile fCadeImg, MultipartFile fPhotoImg, String[] ckone,
			HttpSession session) {
		/*
		 * 创建时间为当前时间 创建人为session
		 */
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.createStaff(tSysUser, fCadeImg, fPhotoImg, ckone, sessionSysUser);
		return "redirect:backstaffindex";

	}

	/**
	 * @descr 批量上传员工页
	 * @param
	 * @return
	 * @throws @author liys
	 * @date 2021-5-19
	 */
	@RequestMapping(value = "/backmemberupload")
	public String MemberUpload(Model model) {
		return "webbackground/membermanagement/upload";
	}

	/**
	 * @descr 批量上传解析
	 * @param
	 * @return
	 * @throws @author liys
	 * @date 2021-5-19
	 */
	@RequestMapping(value = "/backmemberparser")
	@ResponseBody
	public String Excel(HttpServletRequest request, @RequestParam("file") MultipartFile file, HttpSession session)
			throws Exception {
		if (file == null) {
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("msg", "上传失败");
			return JSONObject.toJSONString(map);
		}
		ImportParams params = new ImportParams();
		params.setTitleRows(1);
		params.setHeadRows(1);
		// params.setNeedVerfiy(true);
		// ExcelImportResult<SysUser> res = null;
		List<SysUser> list = null;
		try {
			// res = ExcelImportUtil.importExcelMore(file.getInputStream(), SysUser.class,
			// params);
			list = ExcelImportUtil.importExcel(file.getInputStream(), SysUser.class, params);
		} catch (Exception e) {
			e.printStackTrace();
		}
		// List<SysUser> failList = res.getFailList();
		// List<SysUser> succList = res.getList();
		// int succNum = succList.size();
		// int failNum = failList.size();
		sysUserServiceImpl.CreateBatch(session, list);
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("succList", succList);
		// map.put("failList", failList);
		// map.put("succNum", succNum);
		// map.put("failNum", failNum);
		map.put("list", list);
		map.put("msg", "上传完成");
		return JSONObject.toJSONString(map);
	}

	/**
	 * 进入修改员工页面
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backtoupdatestaff")
	public String backUpdateStaff(Model model, HttpServletRequest request) {
		// 根据员工id查询信息
		VSysUser dbStaff = sysUserServiceImpl.findByUserID(request.getParameter("iUserID"));
		model.addAttribute("dbStaff", dbStaff);
		// 通过员工ID查询角色
		List<TSysUserRole> lstStaffRole = userPermissionServiceImpl.findByUserID(request.getParameter("iUserID"));
		/* 查询所有角色 */
		model.addAttribute("lstStaffRole", lstStaffRole);
		List<TConstRole> lstConstRole = permissionServiceImpl.findAll();
		model.addAttribute("lstConstRole", lstConstRole);
		return "webbackground/staffmanagement/UpdateStaff";
	}

	/**
	 * 修改员工 判断是否存在该用户 身份证
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistupdateuser")
	@ResponseBody
	public Boolean isExistUpdateUser(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUserByIdentity(request.getParameter("strIdentity"));
		if (dbSysUser == null) {
			return true;
		} else {
			String strUserID = request.getParameter("strUserID");
			if (dbSysUser.getUserID() == Integer.parseInt(strUserID)) {
				return true;
			} else {
				return false;
			}
		}
	}

	/**
	 * 修改员工 判断是否存在该用户 手机号
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistupdateusermobile")
	@ResponseBody
	public Boolean isExistUpdateUserMobile(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUser(request.getParameter("strUserMobile"));
		if (dbSysUser == null) {
			return true;
		} else {
			String strUserID = request.getParameter("strUserID");
			if (dbSysUser.getUserID() == Integer.parseInt(strUserID)) {
				return true;
			} else {
				return false;
			}
		}
	}

	/**
	 * 修改员工 判断是否存在该用户 邮箱
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/isexistupdateusermail")
	@ResponseBody
	public Boolean isExistUpdateUserMail(HttpServletRequest request, Model model) {
		TSysUser dbSysUser = sysUserServiceImpl.findUser(request.getParameter("strMail"));
		if (dbSysUser == null) {
			return true;
		} else {
			String strUserID = request.getParameter("strUserID");
			if (dbSysUser.getUserID() == Integer.parseInt(strUserID)) {
				return true;
			} else {
				return false;
			}
		}
	}

	/**
	 * 修改员工提交
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/backsaveupdatestaff")
	public String backSaveUpdateStaff(TSysUser tSysUser, MultipartFile fCadeImg, MultipartFile fPhotoImg,
			String[] ckone, HttpSession session) {

		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.updateStaff(tSysUser, fCadeImg, fPhotoImg, ckone, sessionSysUser);
		return "redirect:backstaffindex";
	}

	/**
	 * 函数功能说明： 删除用户
	 *
	 * @param 参数说明 tSysUser
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.15
	 */
	@PostMapping("/deletestaffchecked")
	@ResponseBody
	public String deleteStaffChecked(String checkList) {

		sysUserServiceImpl.deleteChecked(checkList);

		return JSONObject.toJSONString(checkList);
	}

	/**
	 * 跳转会员页
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backmemberindex")
	public String findAllMember(Model model) {
		return "webbackground/membermanagement/MemberIndex";
	}

	/**
	 * 函数功能说明： 异步--用户信息列表数据
	 * 
	 * 
	 * @return 返回值说明 jsp页面
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 *
	 */
	@RequestMapping("/backmemberjson")
	@ResponseBody
	public String backMemberJson(HttpServletRequest request, HttpSession session, Model model) {

		// 接收的分页信息处理
		int page = Integer.parseInt(request.getParameter("page"));
		int rows = Integer.parseInt(request.getParameter("rows"));
		int startIndex = (page - 1) * rows;
		int count = rows;
		// 搜索条件
		String strUserName = request.getParameter("userName");
		String strUserSex = request.getParameter("userSex");
		String strUserMobile = request.getParameter("userMobile");
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 超级管理员显示所有的公司的会员 其他旅行社可以看到自己的公司的会员信息
		// 表格数据
		List<VSysUser> lstSysMember = sysUserServiceImpl.findMemberByOrgID(sessionSysUser, strUserName, strUserSex,
				strUserMobile, startIndex, count);

		model.addAttribute("lstSysMember", lstSysMember);
		// 数据总数量
		int total = sysUserServiceImpl.queryMemberCount(sessionSysUser, strUserName, strUserSex, strUserMobile);
		Map<String, Object> ret = new HashMap<String, Object>();
		ret.put("rows", lstSysMember);
		ret.put("total", total);
		return JSONObject.toJSONString(ret);
	}

	/**
	 * 进入创建会员页面
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backtocreatemember")
	public String backCreateMember(Model model, HttpSession session) {
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		// 超级管理员登录查找所有公司
		if (sessionSysUser.getUserID() == 0) {

			List<TSysOrg> lstSysOrg = sysOrgServiceImpl.findAll();
			model.addAttribute("lstSysOrg", lstSysOrg);
		} else {
//查找登录人所在公司信息
			TSysOrg dbSysOrg = sysOrgServiceImpl.findByOrgID(sessionSysUser.getOrgID());
			model.addAttribute("dbSysOrg", dbSysOrg);
		}
//查找登录人所在公司的员工和会员
		List<TSysUser> lstSysUser = sysUserServiceImpl.findByOrgID(sessionSysUser.getOrgID());
		model.addAttribute("lstSysUser", lstSysUser);
		/* 查询所有角色 */
		List<TConstRole> lstConstRole = permissionServiceImpl.findAll();
		model.addAttribute("lstConstRole", lstConstRole);
		return "webbackground/membermanagement/CreateMember";
	}

	/**
	 * 创建会员 填写推荐人用
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/finduserbyorgid")
	@ResponseBody
	public Map<String, Object> findUserByOrgID(HttpServletRequest request, Model model) {

//查找该公司的员工 和会员
		List<TSysUser> lstSysUser = sysUserServiceImpl.findByOrgID(Integer.parseInt(request.getParameter("iOrgID")));

		Map<String, Object> data = new HashMap<>();
		data.put("lstSysUser", lstSysUser);
		return data;
	}

	/**
	 * 创建会员 提交
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/backsavecreatemember")
	public String saveCreateMember(TSysUser tSysUser, MultipartFile fCadeImg, MultipartFile fPhotoImg,
			HttpSession session) {
		/*
		 * 创建时间为当前时间 创建人为session
		 */
		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.createMember(tSysUser, fCadeImg, fPhotoImg, sessionSysUser);
		return "redirect:backmemberindex";

	}

	/**
	 * 进入修改员工页面
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */

	@RequestMapping(value = "/backtoupdatemember")
	public String backUpdateMember(Model model, HttpServletRequest request) {
		// 根据员工id查询信息
		VSysUser dbMember = sysUserServiceImpl.findByUserID(request.getParameter("iUserID"));
		model.addAttribute("dbMember", dbMember);
		return "webbackground/membermanagement/UpdateMember";
	}

	/**
	 * 修改会员提交
	 * 
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.17
	 */
	@RequestMapping(value = "/backsaveupdatemember")
	public String backSaveUpdateMember(TSysUser tSysUser, MultipartFile fCadeImg, MultipartFile fPhotoImg,
			HttpSession session) {

		TSysUser sessionSysUser = (TSysUser) session.getAttribute("tSysUser");
		sysUserServiceImpl.updateMember(tSysUser, fCadeImg, fPhotoImg, sessionSysUser);
		return "redirect:backmemberindex";
	}

	/**
	 * 函数功能说明： 删除游客
	 *
	 * @param 参数说明 tSysUser
	 * @return 返回值说明 jsp页面
	 * @throws 异常处理说明
	 * @author 创建人 hanxl
	 * @date 创建日期 2021.03.15
	 */
	@PostMapping("/deletememberchecked")
	@ResponseBody
	public String deleteMemberChecked(String checkList) {

		sysUserServiceImpl.deleteChecked(checkList);

		return JSONObject.toJSONString(checkList);
	}
	
	/**
	  * @descr 下拉列表--本公司的导游
	  * @param HttpSession
	  * @return 
	  * @throws 
	  * @author liys
	  * @date 2021-6-21
	 */
	@RequestMapping("/getToursByOrg")
	@ResponseBody
	public String getToursByOrg(HttpSession session) {
		
		TSysUser user = (TSysUser) session.getAttribute("tSysUser");
		int iOrgID = user.getOrgID();
		List<Map<String,Object>> res = sysUserServiceImpl.getToursByOrg(iOrgID);
		return JSONObject.toJSONString(res);
	}
}
